
{[include file="material/_view.tpl"]}

<fieldset><legend>材料图片</legend>
<table>
	<tr align="center">
		<th width="40">序号</th>
		<th>图片</th>
		<th>排序</th>
		<th>创建时间</th>
	</tr>
	{[foreach name=outer key=key item=item from=$pic]} {[assign var="no" value="`$key+$pager->from+1`"]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td>{[$no]}</td>

		<td><img src="{[$item.file]}" width="60" title="{[$item.name]}" style="border: 1px solid #666;"></td>
		<td>{[$item.orderby]}</td>

		<td>{[$item.createtime]}</td>
	</tr>
	{[/foreach]}
</table>
</fieldset>

<fieldset><legend>添加新图片</legend>
<form id="form_add"><input type="hidden" name="id" value="{[$smarty.request.id]}" /> <input type="hidden" name="_upload"
	id="_upload" value="1" />
<table>
	<tr>
		<td width="20%" align="right">文件名：</td>
		<td width="80%"><select name='filename' id='filename'>
			{[html_options options=$filename_option selected=safe]}
		</select></td>
	</tr>
	<tr>
		<td align="right">附件：</td>
		<td><input type="file" name="userfile" id="userfile" size="42" value=""></td>
	</tr>
</table>
</form>
</fieldset>

<script type="text/javascript" src="js/material/pic/add.js?r={[$smarty.now]}"></script>